﻿namespace NTLib.Core.Exceptions.Shared
{
    using NTLib.Core.Shared;
    using System;

    /// <summary>
    /// Raised when you try to access a ISharedValue from a bad key.
    /// </summary>
    public sealed class SharedValueNoFoundException : BaseSharedException
    {
        #region Ctor

        /// <summary>
        /// Initializes a new instance of the <see cref="SharedValueNoFoundException" /> class.
        /// </summary>
        /// <param name="key">The key.</param>
        /// <param name="msg">The MSG.</param>
        /// <param name="ex">The ex.</param>
        public SharedValueNoFoundException(ISharedValueKey key, string msg = null, Exception ex = null)
            : base(msg, ex)
        {
            this.Key = key;
        }

        #endregion

        #region Properties

        /// <summary>
        /// Gets the key.
        /// </summary>
        public ISharedValueKey Key { get; }

        #endregion
    }
}
